#if !defined(TEST_DESCRIPTION_10_1_SUITE_H)
#define TEST_DESCRIPTION_10_1_SUITE_H

#define DESCRIPTION_10_1_TEST_SUITE_CTOR(name_, args_)	\
BOOST_AUTO_TEST_SUITE(Test##name_##Suite)				\
														\
struct Test##name_										\
{														\
	Test##name_()										\
		: m_desc(rt::D3D10_1::name_ args_)				\
	{													\
	}													\
	~Test##name_()										\
	{													\
	}													\
														\
	rt::D3D10_1::name_ m_desc;							\
};

#define DESCRIPTION_10_1_TEST_SUITE(name_) DESCRIPTION_10_1_TEST_SUITE_CTOR(name_, ())

#define DESCRIPTION_10_1_FIXTURE_TEST_CASE(methodName_, descriptionName_, type_, testValue_, fieldName_) \
BOOST_FIXTURE_TEST_CASE(methodName_, Test##descriptionName_)	\
{																\
	type_ value = m_desc.methodName_(testValue_).fieldName_;	\
	BOOST_REQUIRE_EQUAL(testValue_, value);						\
}

#define DESCRIPTION_10_1_TEST_CASE(type_, name_, value_, description_)	\
	DESCRIPTION_10_1_FIXTURE_TEST_CASE(name_##_, description_, type_, value_, name_)

#define TEXTURE_SETTER_TEST_CASE_DEFAULT(testName_, fixture_, methodName_, fakeTextureType_, description_, structName_, valueType_, value_) \
	BOOST_FIXTURE_TEST_CASE(testName_, fixture_) \
	{ \
		fakeTextureType_ texture; \
		texture.GetDescFakeResult = description_; \
		valueType_ value = m_desc.methodName_##_(&texture).structName_; \
		BOOST_REQUIRE(texture.GetDescCalled); \
		BOOST_REQUIRE_EQUAL(value_, value); \
	}

#define TEXTURE_SETTER_TEST_CASE(testName_, fixture_, methodName_, fakeTextureType_, description_, structName_, valueType_, value_) \
	BOOST_FIXTURE_TEST_CASE(testName_, fixture_) \
	{ \
		fakeTextureType_ texture; \
		texture.GetDescFakeResult = description_.methodName_##_(value_); \
		valueType_ value = m_desc.methodName_##_(&texture).structName_; \
		BOOST_REQUIRE(texture.GetDescCalled); \
		BOOST_REQUIRE_EQUAL(value_, value); \
	}

#define TEXTURE1D_SETTER_TEST_CASE(methodName_, fixture_, structName_, valueType_, value_) \
	TEXTURE_SETTER_TEST_CASE(methodName_##FromTexture1D, fixture_, methodName_, \
		FakeD3D10Texture1D, rt::D3D10::Texture1DDescription(DXGI_FORMAT_UNKNOWN, 256), \
		structName_, valueType_, value_)
		
#define TEXTURE2D_SETTER_TEST_CASE(methodName_, fixture_, structName_, valueType_, value_) \
	TEXTURE_SETTER_TEST_CASE(methodName_##FromTexture2D, fixture_, methodName_, \
		FakeD3D10Texture2D, rt::D3D10::Texture2DDescription(DXGI_FORMAT_UNKNOWN, 256, 256), \
		structName_, valueType_, value_)

#define TEXTURE3D_SETTER_TEST_CASE(methodName_, fixture_, structName_, valueType_, value_) \
	TEXTURE_SETTER_TEST_CASE(methodName_##FromTexture3D, fixture_, methodName_, \
		FakeD3D10Texture3D, rt::D3D10::Texture3DDescription(DXGI_FORMAT_UNKNOWN, 256, 256, 256), \
		structName_, valueType_, value_)

#endif
